#include<iostream>
#include<cmath>

bool resolve(double a, double b, double c);

int main(){
    double a = 0;
    double b = 0;
    double c = 0;

    std::cin >> a;
    std::cin >> b;
    std::cin >> c;

    resolve(a, b, c);

    return 0;
}

bool resolve(double a, double b, double c){
    // 实根返回真
    double delta = pow(b, 2) - 4*a*c;
    double r_1 = sqrt(abs(delta))/(2*a);
    double r_2 = -b / (2*a);

    if(delta >= 0){
        double x_1 = r_2 + r_1;
        double x_2 = r_2 - r_1;
        std::cout << "方程的解是实根" << std::endl;
        std::cout << "x1: " << x_1 << std::endl;
        std::cout << "x2: " << x_2 << std::endl;
        return true;
    }else{
        std::cout << "方程的解是虚根" << std::endl;
        std::cout << "x1: " << r_2 << "+" << "i" << r_1 << std::endl;
        std::cout << "x2: " << r_2 << "+" << "i" << -r_1 << std::endl;
        return false;
    }
}
